package com.lzt.flow.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 枚举了一些常用API操作码 Created by macro on 2019/4/19.
 */
@Getter
@AllArgsConstructor
public enum ResultCode implements IErrorCode {
  /**
   * 通用
   */
  SUCCESS(200, "操作成功"), FAILED(9999, "操作失败"), VALIDATE_FAILED(400, "参数检验失败"), UNAUTHORIZED(401,
      "暂未登录或token已经过期"), FORBIDDEN(403, "没有相关权限"),

  /**
   * API FUNCTION 10XX
   */
  VALID_SETTING_ERROR(1001, "配置项异常,请联系管理员"), VALID_PROJECT_CODE_FAILED(1002,
      "参数项目编号校验失败"), VALID_CHANNEL_CODE_NOT_FOUND(1003,
      "项目未配置该渠道调用权限"), VALID_CHANNEL_CODE_NOT_ENABLE(1004,
      "项目未启用该渠道调用权限"), VALID_API_CODE_NOT_BIND(1005,
      "项目未配置该接口调用权限"), VALID_API_CODE_NOT_ENABLE(1006,
      "项目未启用该接口调用权限"), VALID_PROC_ID_MULTIPLE(1007,
      "申请编号重复"), FILE_IS_EMPTY_OR_TYPE_ERROR(1008,
      "上传文件为空或文件类型错误"), EXISTS_SAME_FILE(1009,
      "已存在的同名文件"), UPLOAD_FILE_PARAM_ERROR(1010,
      "文件上传参数异常"), DOWNLOAD_FILE_PARAM_ERROR(1010,
      "文件下载参数异常"), FILE_PARAM_UNSAFE(1011,
      "文件路径安全校验未通过"), ID_IS_EMPTY_OR_ERROR(1012,
      "id为空或错误！"),PORTRAIT_DELETED_FAILED(1013,
      "画像已删除，请勿重复操作！"),PORTRAIT_DELETED_SUCCESS(1014,
      "画像删除成功！"),

  /**
   * 接口管理 11XX
   */
  RULE_STOP(2001, "此规则已停用，请在规则管理启用此规则后再启用"),
  ;

  private long code;
  private String message;

}
